<?php
use yii\helpers\Html;
use yii\widgets\ActiveForm;
use yii\helpers\ArrayHelper;
use yii\helpers\Url;
$this->title = '好友列表';
?>
<?php echo $this->render('_centerHeader') ?>
<!--主体开始-->
<div class="main-area" style=" background: #f5f5f5;">
    <div class="container">
        <div class="column-layout">
            <!-- main-area-left start  -->
<div class="column-col column-full main-area-left">
<div class="main-area-leftin tab-box">
<div class="ibox">
    <div class="ibox-in">
        <div class="ibox-head">
            <ul class="tab-list" role="tablist">
                <li role="presentation" class="active">
                    <a href="#BASIC_DOC" aria-controls="BASIC_DOC" role="tab" data-toggle="tab">好友列表</a>
                </li>
            </ul>
        </div>
        <div class="row my-fansfriend-list">
	<!-- item  -->
<?php if($friend_num != 0){?>
<?php foreach($friends as $k=>$v){?>
		<div class="item col-xs-6">
		<div class="col-in">
			<div class="column-layout">
				<div class="column-col">
					<span class="u-photo u-photot-btn"><img src="http://files.bwphp.com/file/image/show/50/50?path=<?php echo $v['user_thumb']?>" alt="" class='huanxin'></span>
				</div>
				<div class="column-col column-full">
					<div class="column-layout">
						<div class="column-col-l">
							<span class="u-name">
								<a href="http://www.bwphp.com/group/common/dynmsg/40296/" target="_blank">
								<?php echo $v['user_name']?>
								
								</a>
							</span>
						</div>
						<div class="column-col-r">
							<div class="dropdown">
								
									<a id="" data-target="#" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">已为好友<span class="caret"></span></a>
								
							</div>
						</div>
					</div>
				</div>
			</div>
	</div>
</div>
<?php }?>
<?php }else{
	echo "<center><h1>你当前没有好友</h1></center>";
}?>
</div></div></div></div>
</div>
            <!-- main-area-left end  -->
            <!-- main-area-right start  -->
            <div dy-v="00-00-11-11" class="column-col main-area-right">
                
                <!-- 课程推荐 -->
                <?php echo $this->render('../common/_courseRecommend') ?>
 
                <!-- 名师推荐 -->
                <?php echo $this->render('../common/_teacherRecommend') ?>

                <!-- 图片广告 -->
                <?php echo  $this->render('../common/_adRecommend') ?>
            </div>
            <!-- main-area-right end  -->
        </div>
    </div>
</div>
<script>
	$('.huanxin').dblclick(function(){
		window.open("<?= Url::to(['center/chat'])?>"); 
	})
</script>